﻿namespace Snake.FSM
{
    public class NotCondition<TOwner> : FsmCondition<TOwner>
    {
        private readonly FsmCondition<TOwner> _condition;

        public NotCondition(FsmCondition<TOwner> con)
        {
            _condition = con;
        }

        public override bool Condition(TOwner owner)
        {
            return !_condition.Condition(owner);
        }
    }
}